<%@page import="ch01.User"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
   
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<title></title>
<style type="text/css">
	#loginInfo 
	{
		text-align: center;
		margin-top: 50px;
	}
</style>
</head>
<body>
	<%
		List loginedUsers = new ArrayList();//访问者列表
		//从全局范围内取出访问者列表
		if (application.getAttribute("LOGINED USER") != null) {
			loginedUsers = (List)application.getAttribute("LOGINED USER");
		}
		String num = (String)application.getAttribute("COUNT");
	 %>
	 <div id="loginInfo">
	 	目前，本站被访问过<%=num %>次！<br />
	 	目前，有<%=loginedUsers.size() %>人已经访问过本网站！<br /><br />
	 	访问者的登录名分别是：<br />
	 	<%
	 		for (int i = 0; i < loginedUsers.size(); i++) {
	 			User loginedUser = (User)loginedUsers.get(i);
	 			out.print(loginedUser.getName());
	 			out.print("<br />");
	 		}
	 	 %>
	 </div>
	 
</body>
</html>